﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace WebShop.Classes.Messaging
{
    /// <summary>
    /// On site message class
    /// </summary>
    public class Message
    {
        /// <summary>
        /// Message text
        /// </summary>
        public string Text { get; set; }

        /// <summary>
        /// Message type
        /// </summary>
        public MessageType Type { get; set; }

        /// <summary>
        /// Text variant message type
        /// </summary>
        public string TypeText { 
            get { 
                string result = "";

                switch (Type)
                { 
                    case MessageType.Info:
                        result = "info";
                        break;
                    case MessageType.Error:
                        result = "error";
                        break;
                }

                return result;
            } 
        }
    }
}